// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;

impl std::fmt::Debug for super::TroubleshootIamPolicyRequest {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("TroubleshootIamPolicyRequest");
        debug_struct.field("access_tuple", &self.access_tuple);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::TroubleshootIamPolicyResponse {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("TroubleshootIamPolicyResponse");
        debug_struct.field("overall_access_state", &self.overall_access_state);
        debug_struct.field("access_tuple", &self.access_tuple);
        debug_struct.field("allow_policy_explanation", &self.allow_policy_explanation);
        debug_struct.field("deny_policy_explanation", &self.deny_policy_explanation);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::AccessTuple {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AccessTuple");
        debug_struct.field("principal", &self.principal);
        debug_struct.field("full_resource_name", &self.full_resource_name);
        debug_struct.field("permission", &self.permission);
        debug_struct.field("permission_fqdn", &self.permission_fqdn);
        debug_struct.field("condition_context", &self.condition_context);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::ConditionContext {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("ConditionContext");
        debug_struct.field("resource", &self.resource);
        debug_struct.field("destination", &self.destination);
        debug_struct.field("request", &self.request);
        debug_struct.field("effective_tags", &self.effective_tags);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::condition_context::Resource {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Resource");
        debug_struct.field("service", &self.service);
        debug_struct.field("name", &self.name);
        debug_struct.field("r#type", &self.r#type);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::condition_context::Peer {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Peer");
        debug_struct.field("ip", &self.ip);
        debug_struct.field("port", &self.port);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::condition_context::Request {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Request");
        debug_struct.field("receive_time", &self.receive_time);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::condition_context::EffectiveTag {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("EffectiveTag");
        debug_struct.field("tag_value", &self.tag_value);
        debug_struct.field("namespaced_tag_value", &self.namespaced_tag_value);
        debug_struct.field("tag_key", &self.tag_key);
        debug_struct.field("namespaced_tag_key", &self.namespaced_tag_key);
        debug_struct.field("tag_key_parent_name", &self.tag_key_parent_name);
        debug_struct.field("inherited", &self.inherited);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::AllowPolicyExplanation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AllowPolicyExplanation");
        debug_struct.field("allow_access_state", &self.allow_access_state);
        debug_struct.field("explained_policies", &self.explained_policies);
        debug_struct.field("relevance", &self.relevance);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::ExplainedAllowPolicy {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("ExplainedAllowPolicy");
        debug_struct.field("allow_access_state", &self.allow_access_state);
        debug_struct.field("full_resource_name", &self.full_resource_name);
        debug_struct.field("binding_explanations", &self.binding_explanations);
        debug_struct.field("relevance", &self.relevance);
        debug_struct.field("policy", &self.policy);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::AllowBindingExplanation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AllowBindingExplanation");
        debug_struct.field("allow_access_state", &self.allow_access_state);
        debug_struct.field("role", &self.role);
        debug_struct.field("role_permission", &self.role_permission);
        debug_struct.field("role_permission_relevance", &self.role_permission_relevance);
        debug_struct.field("combined_membership", &self.combined_membership);
        debug_struct.field("memberships", &self.memberships);
        debug_struct.field("relevance", &self.relevance);
        debug_struct.field("condition", &self.condition);
        debug_struct.field("condition_explanation", &self.condition_explanation);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::allow_binding_explanation::AnnotatedAllowMembership {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AnnotatedAllowMembership");
        debug_struct.field("membership", &self.membership);
        debug_struct.field("relevance", &self.relevance);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::DenyPolicyExplanation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("DenyPolicyExplanation");
        debug_struct.field("deny_access_state", &self.deny_access_state);
        debug_struct.field("explained_resources", &self.explained_resources);
        debug_struct.field("relevance", &self.relevance);
        debug_struct.field("permission_deniable", &self.permission_deniable);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::ExplainedDenyResource {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("ExplainedDenyResource");
        debug_struct.field("deny_access_state", &self.deny_access_state);
        debug_struct.field("full_resource_name", &self.full_resource_name);
        debug_struct.field("explained_policies", &self.explained_policies);
        debug_struct.field("relevance", &self.relevance);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::ExplainedDenyPolicy {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("ExplainedDenyPolicy");
        debug_struct.field("deny_access_state", &self.deny_access_state);
        debug_struct.field("policy", &self.policy);
        debug_struct.field("rule_explanations", &self.rule_explanations);
        debug_struct.field("relevance", &self.relevance);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::DenyRuleExplanation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("DenyRuleExplanation");
        debug_struct.field("deny_access_state", &self.deny_access_state);
        debug_struct.field(
            "combined_denied_permission",
            &self.combined_denied_permission,
        );
        debug_struct.field("denied_permissions", &self.denied_permissions);
        debug_struct.field(
            "combined_exception_permission",
            &self.combined_exception_permission,
        );
        debug_struct.field("exception_permissions", &self.exception_permissions);
        debug_struct.field("combined_denied_principal", &self.combined_denied_principal);
        debug_struct.field("denied_principals", &self.denied_principals);
        debug_struct.field(
            "combined_exception_principal",
            &self.combined_exception_principal,
        );
        debug_struct.field("exception_principals", &self.exception_principals);
        debug_struct.field("relevance", &self.relevance);
        debug_struct.field("condition", &self.condition);
        debug_struct.field("condition_explanation", &self.condition_explanation);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::deny_rule_explanation::AnnotatedPermissionMatching {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AnnotatedPermissionMatching");
        debug_struct.field("permission_matching_state", &self.permission_matching_state);
        debug_struct.field("relevance", &self.relevance);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::deny_rule_explanation::AnnotatedDenyPrincipalMatching {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AnnotatedDenyPrincipalMatching");
        debug_struct.field("membership", &self.membership);
        debug_struct.field("relevance", &self.relevance);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::ConditionExplanation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("ConditionExplanation");
        debug_struct.field("value", &self.value);
        debug_struct.field("errors", &self.errors);
        debug_struct.field("evaluation_states", &self.evaluation_states);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::condition_explanation::EvaluationState {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("EvaluationState");
        debug_struct.field("start", &self.start);
        debug_struct.field("end", &self.end);
        debug_struct.field("value", &self.value);
        debug_struct.field("errors", &self.errors);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}
